package main

import "fmt"

func main() {

	//函数，go语言的函数可以返回多个值

	id, name := testFun(1, 2)

	fmt.Println("id", id, "name", name)

	sum, success := test3(1, 3)
	fmt.Println("两数之和", sum, "操作结果", success)
}

func testFun(a int, _ int) (int, string) {

	return a, "hello world"
}

/*
*
直接指明返回值让返回值参与运算
*/
func test3(a int, b int) (result int, success bool) {

	result = a + b

	success = true

	//默认返回result，success
	return
}
